<?php
/**
* The Header for our theme.
* Displays all of the <head> section and everything up till <div id="wrap">
*
* @package vn.news
* @since vn.news 1.0
*
*/
?><!DOCTYPE html>

<!--[if lt IE 7]> <html class="no-js ie6 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" <?php language_attributes(); ?>> <![endif]-->
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]-->

<head>

	<meta charset="<?php bloginfo('charset'); ?>">
	<meta name="viewport" content="width=device-width">
	<title><?php wp_title( '|', true, 'right' ); ?></title>
	<?php $vnnews_favicon = vnnews_get_favicon_url(); if ( ! empty( $vnnews_favicon ) ) { ?>
		<link rel="Shortcut Icon" href="<?php echo esc_url( $vnnews_favicon ); ?>" type="image/x-icon">
	<?php } else { ?>
		<link rel="Shortcut Icon" href="<?php echo get_template_directory_uri(); ?>/images/favicon.ico" type="image/x-icon" />
	<?php } ?>

	<?php wp_head(); ?>

	<?php if (of_get_option("display_social_post") == "1"): ?>
		<script type="text/javascript">var switchTo5x=true;</script>
		<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/buttons.js"></script>
		<script type="text/javascript">stLight.options({publisher: "e63efe18-9c07-44de-805d-f564909500a3",doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>
	<?php endif; ?>
</head>

<body <?php body_class(); ?>>

<!-- Begin #top -->
<div id="top">
	<div class="container">

		<div class="row">
			<div class="eleven columns">

				<nav id="top-nav">
					<?php if ( has_nav_menu( 'top-menu' ) ) {
						wp_nav_menu( array(
							'theme_location' => 'top-menu',
							'title_li' => '',
							'depth' => 4,
							'container_class' => '',
							'menu_class'      => 'top-menu no-space'
							)
						);
					} else { ?>
						<ul class="top-menu"><?php wp_list_pages('title_li=&depth=4'); ?></ul>
					<?php } ?>
				</nav>

			</div>

			<div class="five columns">

				<ul class="social-icons">
					<?php if (of_get_option('facebook_link') && of_get_option('facebook_link') != '') { ?>
						<li><a class="link-facebook" href="<?php echo of_get_option('facebook_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-facebook"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('twitter_link') && of_get_option('twitter_link') != '') { ?>
						<li><a class="link-twitter" href="<?php echo of_get_option('twitter_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-twitter"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('linkedin_link') && of_get_option('linkedin_link') != '') { ?>
						<li><a class="link-linkedin" href="<?php echo of_get_option('linkedin_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-linkedin"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('dribbble_link') && of_get_option('dribbble_link') != '') { ?>
						<li><a class="link-dribbble" href="<?php echo of_get_option('dribbble_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-dribbble"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('skype_link') && of_get_option('skype_link') != '') { ?>
						<li><a class="link-skype" href="<?php echo of_get_option('skype_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-skype"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('plus_link') && of_get_option('plus_link') != '') { ?>
						<li><a class="link-google" href="<?php echo of_get_option('plus_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-googleplus"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('pinterest_link') && of_get_option('pinterest_link') != '') { ?>
						<li><a class="link-pinterest" href="<?php echo of_get_option('pinterest_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-pinterest"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('github_link') && of_get_option('github_link') != '') { ?>
						<li><a class="link-github" href="<?php echo of_get_option('github_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-github"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('instagram_link') && of_get_option('instagram_link') != '') { ?>
						<li><a class="link-instagram" href="<?php echo of_get_option('instagram_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-instagram-2"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('youtube_link') && of_get_option('youtube_link') != '') { ?>
						<li><a class="link-youtube" href="<?php echo of_get_option('youtube_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-youtube"></span></a></li>
					<?php } ?>
					<?php if (of_get_option('email_link') && of_get_option('email_link') != '') { ?>
						<li><a class="link-email" href="mailto:<?php echo of_get_option('email_link'); ?>" target="_blank"><span aria-hidden="true" class="organicon-envelop"></span></a></li>
					<?php } ?>
				</ul>

			</div>

		</div>
	</div>
</div>
<!-- End #top-->

<!-- BEGIN #wrap -->
<div id="wrap">

	<!-- BEGIN .container -->
	<div class="container">

		<!-- BEGIN #header -->
		<div id="header">

			<!-- BEGIN .row -->
			<div class="row head">

				<!-- BEGIN .four columns -->
				<div class="four columns">
					<?php $vnnews_logo = vnnews_get_logo_url(); if ( ! empty( $vnnews_logo ) ) { ?>
						<h1 id="logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $vnnews_logo ); ?>" alt="<?php esc_attr( bloginfo('name') ); ?>" /></a></h1>
					<?php } else { ?>
						<h1 id="logo"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo get_bloginfo("template_url"); ?>/images/vn.news-logo.png" alt="<?php esc_attr( bloginfo('name') ); ?>" /></a></h1>
					<?php } ?>
				</div>
				<!-- END .four columns -->

				<div class="eleven columns">

				<?php if(is_active_sidebar("banner-sidebar")) dynamic_sidebar("banner-sidebar"); ?>

				</div>

			<!-- END .row -->
			</div>

			<div class="row">
				<div class="sixteen columns">
					<!-- BEGIN #navigation -->
					<nav id="navigation" class="navigation-main shadow <?php if ( is_home() ) { ?>radius-top home-nav<?php } else { ?>radius-full<?php } ?> clearfix" role="navigation">

						<h1 class="menu-toggle"><?php _e( 'Menu', 'organicthemes' ); ?></h1>

						<?php if ( has_nav_menu( 'header-menu' ) ) {
							wp_nav_menu( array(
								'theme_location' => 'header-menu',
								'title_li' => '',
								'depth' => 4,
								'container_class' => '',
								'menu_class'      => 'menu'
								)
							);
						} else { ?>
							<ul class="menu"><?php wp_list_pages('title_li=&depth=4'); ?></ul>
						<?php } ?>

					<!-- END #navigation -->
					</nav>
				</div>
			</div>

		<!-- END #header -->
		</div>

		<div id="breaking-news">
			<div class="row">
			</div>
		</div>

	</div>

	<!-- BEGIN .container -->
	<div class="container">